package com.hengxinguotong.zhihuichengjian.net;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by hjz on 2018/5/14.
 */

public interface DownloadService
{
    /**
     * 下载文件
     *
     * @param url
     * @return
     */
    @Streaming
    @GET
    Call<ResponseBody> downloadFile(@Url String url);

    /**
     * 下载文件一部分
     *
     * @param range
     * @param url
     * @return
     */
    @Streaming
    @GET
    Call<ResponseBody> downloadFile(@Header("Range") String range, @Url String url);
}
